package com.kx.springboot003.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
public class IndexController {
    @RequestMapping("say")
    public @ResponseBody String say(){
        return "Hello,SpringBoot!";
    }
    @RequestMapping("/sayMap")
    @ResponseBody
    public Map<String,Object> sayMap(){
        Map<String,Object> map=new HashMap<>();
        map.put("name","zkx");
        return map;
    }
}
